package com.mrogrape.notepad.activity.action.item;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

import com.mrogrape.notepad.data.ViewContext;


public class CloseMenuItemAction  extends AbstractAction{

	/** serialVersionUID */
	private static final long serialVersionUID = 1L;

	public CloseMenuItemAction(){

		super.putValue(Action.NAME, "Close");
		super.putValue(Action.SHORT_DESCRIPTION, "Close current tab.");
	}


	@Override
	public void actionPerformed(ActionEvent arg0) {

		ViewContext.getMainFrame().closeWorkPanel(ViewContext.getMainFrame().getCurrentWorkPanel());
	}
}
